package com.ihg.hiex.entity.session.during;

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import com.ihg.hiex.entity.session.Session;
import com.ihg.hiex.entity.user.Assessor;
import com.ihg.hiex.entity.user.Delegate;

/**
 * 学员反馈
 *
 * @author Ark
 *
 */
@Entity
@Table(name = "delegate_feedback")
public class DelegateFeedback {

    @Id
    @GeneratedValue
    private Long id;
    
    @ManyToOne(fetch = FetchType.LAZY, optional = true)
    private Session session;
    
    @ManyToOne(fetch = FetchType.LAZY, optional = true)
    private Assessor assessor;
    
    @ManyToOne(fetch = FetchType.LAZY, optional = true)
    private Delegate delegate;
    
    /** 反馈程度 */
    private DelegateFeedbackLevel level;
    
    /** 评论 */
    private String comment;
    
    private Date createTime;
    
    @Column(name = "is_disabled")
    private boolean disabled;
    
    /**
     * The default constructor
     */
    public DelegateFeedback() {
    }
    
    /**
     * @param session
     * @param assessor
     * @param delegate
     * @return
     */
    public DelegateFeedback initialize(Session session, Assessor assessor, Delegate delegate) {
        this.session = session;
        this.assessor = assessor;
        this.delegate = delegate;
        this.createTime = new Date();
        this.disabled = false;
        return this;
    }

    /**
     * @return the id
     */
    public Long getId() {
        return id;
    }

    /**
     * @return the session
     */
    public Session getSession() {
        return session;
    }

    /**
     * @return the assessor
     */
    public Assessor getAssessor() {
        return assessor;
    }

    /**
     * @return the delegate
     */
    public Delegate getDelegate() {
        return delegate;
    }

    /**
     * @return the level
     */
    public DelegateFeedbackLevel getLevel() {
        return level;
    }

    /**
     * @return the comment
     */
    public String getComment() {
        return comment;
    }

    /**
     * @return the createTime
     */
    public Date getCreateTime() {
        return createTime;
    }

    /**
     * @return the disabled
     */
    public boolean isDisabled() {
        return disabled;
    }

    /**
     * @param id the id to set
     */
    public void setId(Long id) {
        this.id = id;
    }

    /**
     * @param session the session to set
     */
    public void setSession(Session session) {
        this.session = session;
    }

    /**
     * @param assessor the assessor to set
     */
    public void setAssessor(Assessor assessor) {
        this.assessor = assessor;
    }

    /**
     * @param delegate the delegate to set
     */
    public void setDelegate(Delegate delegate) {
        this.delegate = delegate;
    }

    /**
     * @param level the level to set
     */
    public void setLevel(DelegateFeedbackLevel level) {
        this.level = level;
    }

    /**
     * @param comment the comment to set
     */
    public void setComment(String comment) {
        this.comment = comment;
    }

    /**
     * @param createTime the createTime to set
     */
    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    /**
     * @param disabled the disabled to set
     */
    public void setDisabled(boolean disabled) {
        this.disabled = disabled;
    }
    
}